commonlibsse_ng\re\t/
TESChildCell.rs

1use crate::re::offsets_rtti::RTTI_TESChildCell;
2use crate::re::offsets_vtable::VTABLE_TESChildCell;
3use crate::rel::id::VariantID;
4use core::ffi::c_void;
5
6#[repr(C)]
7#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8pub struct TESChildCell {
9    pub vtable: *const TESChildCellVtbl, // 00
10}
11const _: () = assert!(std::mem::size_of::<TESChildCell>() == 0x8);
12
13impl TESChildCell {
14    /// Address & offset of the runtime type information (RTTI) identifier.
15    pub const RTTI: VariantID = RTTI_TESChildCell;
16
17    /// Address & offset of the virtual function table.
18    ///
19    /// The number of tables is the same as the number of classes with inherited virtual functions.
20    pub const VTABLE: [VariantID; 1] = VTABLE_TESChildCell;
21}
22
23#[repr(C)]
24#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
25pub struct TESChildCellVtbl {
26    pub CxxDrop: fn(this: *mut c_void),           // 0x00
27    pub GetSaveParentCell: fn(this: *mut c_void), // 0x01
28}
29const _: () = {
30    const VFUNC_COUNT: usize = 0x2;
31
32    const EXPECTED_SIZE: usize = VFUNC_COUNT * core::mem::size_of::<usize>();
33    assert!(core::mem::size_of::<TESChildCellVtbl>() == EXPECTED_SIZE);
34};